:root {
    --primary-color: #6c5ce7;
    /* 深紫 */
    --secondary-color: #a29bfe;
    /* 浅紫 */
    --accent-color: #fd79a8;
    /* 粉红 */
    --text-color: #2d3748;
    --light-gray: #f9f9ff;
    /* 淡紫灰背景 */
    --white: #ffffff;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}


@media print {
    body {
        background: white !important;
        padding: 0 !important;
        font-size: 12pt;
    }
    
    .container {
        box-shadow: none !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .navbar, .mobile-menu-btn, .social-links {
        display: none !important;
    }
    
    header {
        padding: 20px !important;
        break-inside: avoid;
    }
    
    .section {
        padding: 15px 20px !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .progress-bar {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    footer {
        display: none !important;
    }
    
    /* 避免在页面中间分页 */
    .project, .timeline-item {
        page-break-inside: avoid;
        break-inside: avoid;
    }
    
    /* 打印按钮隐藏 */
    .print-btn {
        display: none !important;
    }
}

/* 打印按钮样式 */
.print-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #4a6bff;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
}

.print-btn:hover {
    background: #3a5bef;
    transform: translateY(-3px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'Roboto', sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
    padding: 20px;
    font-weight: 400;
    padding-top: 80px;
    /* 为导航栏留出空间 */
}

/* 新增导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 1000;
    padding: 15px 0;
}

.navbar-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.navbar-logo {
    color: var(--white);
    font-weight: 600;
    font-size: 18px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-logo i {
    font-size: 20px;
}

.navbar-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.navbar-item a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-item a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-item a.active {
    background: var(--white);
    color: var(--primary-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    position: relative;
    overflow: hidden;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"><path d="M0 0 L100 100 M100 0 L0 100"/></svg>');
    opacity: 0.3;
}

.profile {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
}

.profile-img:hover {
    transform: scale(1.05);
}

.profile-text h1 {
    font-size: 32px;
    margin-bottom: 8px;
    font-weight: 700;
}

.profile-text p {
    font-size: 18px;
    opacity: 0.9;
}

.tagline {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    font-size: 14px;
    backdrop-filter: blur(5px);
}

.contact-info {
    text-align: right;
    position: relative;
    z-index: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-bottom: 10px;
}

.contact-info a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info a:hover {
    color: #e2e8f0;
    transform: translateX(-3px);
}

.section {
    padding: 30px 40px;
    border-bottom: 1px solid #edf2f7;
    position: relative;
    scroll-margin-top: 80px;
    /* 导航栏高度 */
}

.section:last-child {
    border-bottom: none;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 24px;
    position: relative;
    padding-bottom: 10px;
    font-weight: 600;
}

h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

h3 {
    color: var(--secondary-color);
    margin: 20px 0 12px;
    font-size: 20px;
    font-weight: 600;
}

.content {
    padding-left: 20px;
}

.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary-color);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--white);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.timeline-title {
    font-weight: 600;
    color: var(--secondary-color);
    font-size: 18px;
}

.timeline-date {
    color: #718096;
    font-size: 15px;
}

.timeline-content {
    color: #4a5568;
}

ul {
    list-style: none;
}

li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 25px;
}

li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.skill {
    background: var(--light-gray);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.skill:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.skill i {
    font-size: 14px;
}

.project {
    margin-bottom: 30px;
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.project:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.project-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.project-title {
    font-weight: 600;
    color: var(--secondary-color);
}

.project-date {
    color: #718096;
}

.project-description {
    margin-bottom: 15px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.tech-tag {
    background: rgba(74, 107, 255, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

strong {
    color: var(--secondary-color);
    font-weight: 600;
}

footer {
    text-align: center;
    padding: 20px;
    background: var(--secondary-color);
    color: var(--white);
    font-size: 14px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.social-links a {
    color: var(--white);
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.progress-container {
    width: 100%;
    background-color: #e2e8f0;
    border-radius: 20px;
    margin: 15px 0;
}

.progress-bar {
    height: 8px;
    border-radius: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    position: relative;
    transition: width 1s ease-in-out;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.progress-percent {
    position: absolute;
    right: 10px;
    top: -20px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .navbar-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: rgba(74, 107, 255, 0.95);
        padding: 20px 0;
        transition: var(--transition);
        gap: 15px;
    }

    .navbar-menu.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 30px 20px;
    }

    .profile {
        flex-direction: column;
        text-align: center;
    }

    .contact-info {
        text-align: center;
        width: 100%;
    }

    .contact-item {
        justify-content: center;
    }

    .section {
        padding: 25px 20px;
    }

    .timeline-header {
        flex-direction: column;
        gap: 5px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeIn 0.6s ease-out forwards;
}

.section:nth-child(2) {
    animation-delay: 0.1s;
}

.section:nth-child(3) {
    animation-delay: 0.2s;
}

.section:nth-child(4) {
    animation-delay: 0.3s;
}

.section:nth-child(5) {
    animation-delay: 0.4s;
}

.section:nth-child(6) {
    animation-delay: 0.5s;
}